function main(require, module, exports) {
    const { foo } = require("./foo.js")
    console.log(foo)
    console.log('main')
}
function foo(require, module, exports) {
    const foo = 'foo'
    module.exports = {
        foo
    }
}
function require(path) {
    const map = {
        './foo.js': foo,
        './main.js': main
    }
    const fn = map[path]
    const module = {
        exports: {
        }
    }
    fn(require, module, module.exports)
    return module.exports
}
require('./main.js')